﻿package com.firewolf.iteratorAndComponent.component.main;

import com.firewolf.iteratorAndComponent.component.basic.MenuComponent;
import com.firewolf.iteratorAndComponent.component.menuAndItem.MyMenu;
import com.firewolf.iteratorAndComponent.component.menuAndItem.MyMenuItem;

public class TestMainDriver {
	public static void main(String[] args) {
		MenuComponent breakfastMenu = new MyMenu("Breakfast Menu ", "Breakfast");// 早餐菜单
		MenuComponent lunchMenu = new MyMenu("Lunch Menu ", "Lunch");// 早餐菜单
		MenuComponent dinnerMenu = new MyMenu("Dinner Menu ", "Dinner");// 早餐菜单

		MenuComponent allMenus = new MyMenu("All Menus", "This is All Menus");
		// 加入菜单
		allMenus.add(breakfastMenu);
		allMenus.add(lunchMenu);
		allMenus.add(dinnerMenu);

		// 加入菜单项
		breakfastMenu.add(new MyMenuItem("nodule", "this is nodule", true, 5.0));
		breakfastMenu.add(new MyMenuItem("cabbage", "this is cabbage", true,2.0));
		breakfastMenu.add(new MyMenuItem("caw", "this is cabbage", false, 2.0));
		breakfastMenu.add(new MyMenuItem("duck", "this is cabbage", false, 2.0));

		dinnerMenu.add(new MyMenuItem("Potato", "this is potato", true, 8.0));
		dinnerMenu.add(new MyMenuItem("tomato", "this is tomato", true, 12.0));
		dinnerMenu.add(new MyMenuItem("chiken", "this is chiken", false, 23.0));
		dinnerMenu.add(new MyMenuItem("pig", "this is chiken", false, 23.0));

		Waitor waitor = new Waitor(allMenus);
		waitor.printAllMenus();
	}
}
